﻿Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting.Conditions

<TestClass()> _
Public Class procCreateException
    Inherits DatabaseTestClass

    Sub New()
        InitializeComponent()
    End Sub

    <TestInitialize()> _
    Public Sub TestInitialize()
        InitializeTest()
    End Sub

    <TestCleanup()> _
    Public Sub TestCleanup()
        CleanupTest()
    End Sub



#Region "Designer support code"

    'NOTE: The following procedure is required by the Designer
    'It can be modified using the Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
    Dim UT000001_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(procCreateException))
    Dim UT000001_ScalarValue_ID As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_System As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_Message As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_Source As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_StackTrace As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_TargetSite As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_ExceptionDateTime As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_SeverityID As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_NotificationSent As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_ClassName As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_ScalarValue_MethodName As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000001_PretestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000001_PosttestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Me.UT000001Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    UT000001_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000001_ScalarValue_ID = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_System = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_Message = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_Source = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_StackTrace = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_TargetSite = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_ExceptionDateTime = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_SeverityID = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_NotificationSent = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_ClassName = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_ScalarValue_MethodName = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000001_PretestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000001_PosttestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    '
    'UT000001_TestAction
    '
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_ID)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_System)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_Message)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_Source)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_StackTrace)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_TargetSite)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_ExceptionDateTime)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_SeverityID)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_NotificationSent)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_ClassName)
    UT000001_TestAction.Conditions.Add(UT000001_ScalarValue_MethodName)
    resources.ApplyResources(UT000001_TestAction, "UT000001_TestAction")
    '
    'UT000001_ScalarValue_ID
    '
    UT000001_ScalarValue_ID.ColumnNumber = 1
    UT000001_ScalarValue_ID.Enabled = True
    UT000001_ScalarValue_ID.ExpectedValue = "UT000001"
    UT000001_ScalarValue_ID.Name = "UT000001_ScalarValue_ID"
    UT000001_ScalarValue_ID.NullExpected = False
    UT000001_ScalarValue_ID.ResultSet = 1
    UT000001_ScalarValue_ID.RowNumber = 1
    '
    'UT000001_ScalarValue_System
    '
    UT000001_ScalarValue_System.ColumnNumber = 2
    UT000001_ScalarValue_System.Enabled = True
    UT000001_ScalarValue_System.ExpectedValue = "System"
    UT000001_ScalarValue_System.Name = "UT000001_ScalarValue_System"
    UT000001_ScalarValue_System.NullExpected = False
    UT000001_ScalarValue_System.ResultSet = 1
    UT000001_ScalarValue_System.RowNumber = 1
    '
    'UT000001_ScalarValue_Message
    '
    UT000001_ScalarValue_Message.ColumnNumber = 3
    UT000001_ScalarValue_Message.Enabled = True
    UT000001_ScalarValue_Message.ExpectedValue = "Message"
    UT000001_ScalarValue_Message.Name = "UT000001_ScalarValue_Message"
    UT000001_ScalarValue_Message.NullExpected = False
    UT000001_ScalarValue_Message.ResultSet = 1
    UT000001_ScalarValue_Message.RowNumber = 1
    '
    'UT000001_ScalarValue_Source
    '
    UT000001_ScalarValue_Source.ColumnNumber = 4
    UT000001_ScalarValue_Source.Enabled = True
    UT000001_ScalarValue_Source.ExpectedValue = "Source"
    UT000001_ScalarValue_Source.Name = "UT000001_ScalarValue_Source"
    UT000001_ScalarValue_Source.NullExpected = False
    UT000001_ScalarValue_Source.ResultSet = 1
    UT000001_ScalarValue_Source.RowNumber = 1
    '
    'UT000001_ScalarValue_StackTrace
    '
    UT000001_ScalarValue_StackTrace.ColumnNumber = 5
    UT000001_ScalarValue_StackTrace.Enabled = True
    UT000001_ScalarValue_StackTrace.ExpectedValue = "StackTrace"
    UT000001_ScalarValue_StackTrace.Name = "UT000001_ScalarValue_StackTrace"
    UT000001_ScalarValue_StackTrace.NullExpected = False
    UT000001_ScalarValue_StackTrace.ResultSet = 1
    UT000001_ScalarValue_StackTrace.RowNumber = 1
    '
    'UT000001_ScalarValue_TargetSite
    '
    UT000001_ScalarValue_TargetSite.ColumnNumber = 6
    UT000001_ScalarValue_TargetSite.Enabled = True
    UT000001_ScalarValue_TargetSite.ExpectedValue = "TargetSite"
    UT000001_ScalarValue_TargetSite.Name = "UT000001_ScalarValue_TargetSite"
    UT000001_ScalarValue_TargetSite.NullExpected = False
    UT000001_ScalarValue_TargetSite.ResultSet = 1
    UT000001_ScalarValue_TargetSite.RowNumber = 1
    '
    'UT000001_ScalarValue_ExceptionDateTime
    '
    UT000001_ScalarValue_ExceptionDateTime.ColumnNumber = 7
    UT000001_ScalarValue_ExceptionDateTime.Enabled = True
    UT000001_ScalarValue_ExceptionDateTime.ExpectedValue = "01/27/2009 22:33"
    UT000001_ScalarValue_ExceptionDateTime.Name = "UT000001_ScalarValue_ExceptionDateTime"
    UT000001_ScalarValue_ExceptionDateTime.NullExpected = False
    UT000001_ScalarValue_ExceptionDateTime.ResultSet = 1
    UT000001_ScalarValue_ExceptionDateTime.RowNumber = 1
    '
    'UT000001_ScalarValue_SeverityID
    '
    UT000001_ScalarValue_SeverityID.ColumnNumber = 8
    UT000001_ScalarValue_SeverityID.Enabled = True
    UT000001_ScalarValue_SeverityID.ExpectedValue = "1"
    UT000001_ScalarValue_SeverityID.Name = "UT000001_ScalarValue_SeverityID"
    UT000001_ScalarValue_SeverityID.NullExpected = False
    UT000001_ScalarValue_SeverityID.ResultSet = 1
    UT000001_ScalarValue_SeverityID.RowNumber = 1
    '
    'UT000001_ScalarValue_NotificationSent
    '
    UT000001_ScalarValue_NotificationSent.ColumnNumber = 9
    UT000001_ScalarValue_NotificationSent.Enabled = True
    UT000001_ScalarValue_NotificationSent.ExpectedValue = "False"
    UT000001_ScalarValue_NotificationSent.Name = "UT000001_ScalarValue_NotificationSent"
    UT000001_ScalarValue_NotificationSent.NullExpected = False
    UT000001_ScalarValue_NotificationSent.ResultSet = 1
    UT000001_ScalarValue_NotificationSent.RowNumber = 1
    '
    'UT000001_ScalarValue_ClassName
    '
    UT000001_ScalarValue_ClassName.ColumnNumber = 10
    UT000001_ScalarValue_ClassName.Enabled = True
    UT000001_ScalarValue_ClassName.ExpectedValue = "ClassName"
    UT000001_ScalarValue_ClassName.Name = "UT000001_ScalarValue_ClassName"
    UT000001_ScalarValue_ClassName.NullExpected = False
    UT000001_ScalarValue_ClassName.ResultSet = 1
    UT000001_ScalarValue_ClassName.RowNumber = 1
    '
    'UT000001_ScalarValue_MethodName
    '
    UT000001_ScalarValue_MethodName.ColumnNumber = 11
    UT000001_ScalarValue_MethodName.Enabled = True
    UT000001_ScalarValue_MethodName.ExpectedValue = "MethodName"
    UT000001_ScalarValue_MethodName.Name = "UT000001_ScalarValue_MethodName"
    UT000001_ScalarValue_MethodName.NullExpected = False
    UT000001_ScalarValue_MethodName.ResultSet = 1
    UT000001_ScalarValue_MethodName.RowNumber = 1
    '
    'UT000001_PretestAction
    '
    resources.ApplyResources(UT000001_PretestAction, "UT000001_PretestAction")
    '
    'UT000001_PosttestAction
    '
    resources.ApplyResources(UT000001_PosttestAction, "UT000001_PosttestAction")
    '
    'UT000001Data
    '
    Me.UT000001Data.PosttestAction = UT000001_PosttestAction
    Me.UT000001Data.PretestAction = UT000001_PretestAction
    Me.UT000001Data.TestAction = UT000001_TestAction
  End Sub

#End Region

#Region "Additional test attributes"
  '
  ' You can use the following additional attributes as you write your tests:
  '
  ' Use ClassInitialize to run code before running the first test in the class
  ' <ClassInitialize()> Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
  ' End Sub
  '
  ' Use ClassCleanup to run code after all tests in a class have run
  ' <ClassCleanup()> Public Shared Sub MyClassCleanup()
  ' End Sub
  '
#End Region


  <TestMethod()> _
  Public Sub UT000001()
    Dim testActions As DatabaseTestActions = Me.UT000001Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub


  Private UT000001Data As DatabaseTestActions
End Class

